package com.crm.model;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 交易
 * </p>
 *
 * @author zjd
 * @since 2021-04-01
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("user_deal")
@ApiModel(value="Deal对象", description="交易")
public class Deal extends Model {

    private static final long serialVersionUID = 1L;

    @TableId(type=IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "交易名称")
    private String name;

    private Long pipeline;

    @ApiModelProperty(value = "交易阶段")
    private Long dealStage;

    @ApiModelProperty(value = "金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "钱币符号")
    private Long currencyId;

    @ApiModelProperty(value = "结束日期")
    private Date closeDate;

    @ApiModelProperty(value = "所属用户id")
    private Long ownerUserId;

    @ApiModelProperty(value = "交易类型  新业务，已有业务")
    private Long dealType;

    @ApiModelProperty(value = "关联公司id")
    private Long companyId;

    @ApiModelProperty(value = "创建用户")
    private Long createUserId;

    @ApiModelProperty(value = "关联公司交易 加入时间线")
    private Long associateCompany;

    @ApiModelProperty(value = "关联时间")
    private Date associateCompanyDay;

    @ApiModelProperty(value = "关联联系人交易加入时间线")
    private Long associateContact;

    @ApiModelProperty(value = "关联时间")
    private Date associateContactDay;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @TableLogic
    private Long isDelete;

    @Version
    @TableField(fill = FieldFill.INSERT)
    private Long version;




}
